package com.nwcl.ysx.service.impl;

import com.nwcl.ysx.bo.SpaceBO;
import com.nwcl.ysx.dao.SpaceDao;
import com.nwcl.ysx.entity.Space;
import com.nwcl.ysx.service.SpaceService;
import com.nwcl.common.utils.BeanUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author liguiqin
 * @date 2023/5/25
 */
@Service
public class SpaceServiceImpl implements SpaceService {
    @Autowired
    private SpaceDao spaceDao;
    @Override
    public SpaceBO getById(Integer id) {
        Space space =spaceDao.getById(id);
        if(space==null){
            return  null;
        }
        return BeanUtil.copy(space,SpaceBO.class);
    }
}
